{% load feincms_admin_tags %}
<script type="text/javascript">
/*
type: content type identifier (required)
cssclass: quickbutton CSS class
raw_id_picker: URL of raw_id_fields picker which should be automatically opened
after: callback, receives new fieldset as argument
keep: keep entry in content type dropdown (defaults to false)
*/
{% url "admin:medialibrary_mediafile_changelist" as media_library_url %}
var CONTENT_TYPE_BUTTONS = [
    {
        type: 'richtextcontent',
        keep: true
    }, {
        type: 'imagecontent',
        keep: true
    }, {
        type: 'filecontent',
        keep: true,
        cssclass: 'pdfcontent'
    }, {
        type: 'filerimagecontent',
        keep: true,
        cssclass: 'imagecontent'
    }, {
        type: 'filerfilecontent',
        keep: true,
        cssclass: 'pdfcontent'
    }, {
        type: 'videocontent',
        keep: true,
        cssclass: 'oembedcontent'
{% if media_library_url %}
    }, {
        type: 'mediafilecontent',
        keep: true,
        cssclass: 'imagecontent',
        raw_id_picker: '{{ media_library_url }}?type__exact=image&_popup=1'
    }, {
        type: 'gallerycontent',
        keep: true
    }, {
        type: 'mediafilecontent',
        keep: true,
        cssclass: 'pdfcontent',
        raw_id_picker: '{{ media_library_url }}?type__exact=pdf&_popup=1'
{% endif %}
    }, {
        type: 'oembedcontent',
        keep: true
{% if media_library_url %}
    }, {
        type: 'mediafilecontent',
        keep: true,
        cssclass: 'audiocontent',
        raw_id_picker: '{{ media_library_url }}?type__exact=audio&_popup=1'
{% endif %}
    }
];
</script>
